Optimal. Leaf size=73 \[ -\frac {a^4 \sin ^3(c+d x)}{3 d}+\frac {7 a^4 \sin (c+d x)}{d}+\frac {a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {2 a^4 \sin (c+d x) \cos (c+d x)}{d}+6 a^4 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.08, antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.316, Rules used = {2757, 2637, 2635, 8, 2633, 3770} \[ -\frac {a^4 \sin ^3(c+d x)}{3 d}+\frac {7 a^4 \sin (c+d x)}{d}+\frac {a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {2 a^4 \sin (c+d x) \cos (c+d x)}{d}+6 a^4 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 2637
Rule 2757
Rule 3770
Rubi steps
\begin {align*} \int (a+a \cos (c+d x))^4 \sec (c+d x) \, dx &=\int \left (4 a^4+6 a^4 \cos (c+d x)+4 a^4 \cos ^2(c+d x)+a^4 \cos ^3(c+d x)+a^4 \sec (c+d x)\right ) \, dx\\ &=4 a^4 x+a^4 \int \cos ^3(c+d x) \, dx+a^4 \int \sec (c+d x) \, dx+\left (4 a^4\right ) \int \cos ^2(c+d x) \, dx+\left (6 a^4\right ) \int \cos (c+d x) \, dx\\ &=4 a^4 x+\frac {a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {6 a^4 \sin (c+d x)}{d}+\frac {2 a^4 \cos (c+d x) \sin (c+d x)}{d}+\left (2 a^4\right ) \int 1 \, dx-\frac {a^4 \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{d}\\ &=6 a^4 x+\frac {a^4 \tanh ^{-1}(\sin (c+d x))}{d}+\frac {7 a^4 \sin (c+d x)}{d}+\frac {2 a^4 \cos (c+d x) \sin (c+d x)}{d}-\frac {a^4 \sin ^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.11, size = 91, normalized size = 1.25 \[ \frac {a^4 \left (81 \sin (c+d x)+12 \sin (2 (c+d x))+\sin (3 (c+d x))-12 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )+72 d x\right )}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.81, size = 80, normalized size = 1.10 \[ \frac {36 \, a^{4} d x + 3 \, a^{4} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, a^{4} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (a^{4} \cos \left (d x + c\right )^{2} + 6 \, a^{4} \cos \left (d x + c\right ) + 20 \, a^{4}\right )} \sin \left (d x + c\right )}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.70, size = 116, normalized size = 1.59 \[ \frac {18 \, {\left (d x + c\right )} a^{4} + 3 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 3 \, a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (15 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 38 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 27 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 94, normalized size = 1.29 \[ \frac {\sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) a^{4}}{3 d}+\frac {20 a^{4} \sin \left (d x +c \right )}{3 d}+\frac {2 a^{4} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{d}+6 a^{4} x +\frac {6 a^{4} c}{d}+\frac {a^{4} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 1.52, size = 89, normalized size = 1.22 \[ -\frac {{\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{4} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{4} - 12 \, {\left (d x + c\right )} a^{4} - 3 \, a^{4} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) - 18 \, a^{4} \sin \left (d x + c\right )}{3 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.41, size = 93, normalized size = 1.27 \[ 6\,a^4\,x+\frac {20\,a^4\,\sin \left (c+d\,x\right )}{3\,d}+\frac {2\,a^4\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {a^4\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d}+\frac {2\,a^4\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{4} \left (\int 4 \cos {\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 6 \cos ^{2}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int 4 \cos ^{3}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \cos ^{4}{\left (c + d x \right )} \sec {\left (c + d x \right )}\, dx + \int \sec {\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________